/**
 *
 */
package cn.piaoyi.comm;

import java.io.InputStream;
import java.util.*;

import cn.piaoyi.web.ui.OptionsInt;

/**
 * @author laoer
 *
 */
public class Constant {

	public static final boolean USE_CACHE = true;
	
	public static final String VSERION = "1.0";

	public static final String CHARSET = "UTF-8";
	
	public static String SERVLET_MAPPING = "*.action";
	
	public static String DOMAIN_NAME = "http://www.piao1.cn/";

	public static String ROOTPATH = "";
	
	public static String ARTAXMLPATH = "/WEB-INF/xml/Area.xml";

	public static final String USER_SESSION_KEY = "user_session";

	public static final String ADMIN_SESSION_KEY = "admin_session";

	public static final int ORDER_ASC = 0;

	public static final int ORDER_DESC = 1;
	
	public static final int PAGE_NUM = 20;
	
	public static String PIC_PATH = "upload/photo";
	
	public static String CATEGORY_CONCERT = "concert";	//演唱会
	
	public static String CATEGORY_SHOW = "show";	//音乐会
	
	public static String CATEGORY_DRAMA = "drama";	//话剧
	
	public static String CATEGORY_FAMILY = "family";	//亲子
	
	public static String CATEGORY_TOUR = "tour";	//旅游
	
	public static String CATEGORY_SPORTS = "sports";	//体育
	
	public static String CATEGORY_MEETING = "meeting";	//会议
	
	public static String CATEGORY_FUN = "fun";	//娱乐
	
	public static List GOODS_STATE = new ArrayList();	//商品状态
	public static List GOODS_IS_SHOW = new ArrayList();	//显示状态
	public static List GOODS_LIMIT_TIME = new ArrayList();	//时间设置
	public static int SHIPPING_AMOUNT = 10;		//配置价格
	public static List GOODS_CITY = new ArrayList();	//商品所属城市
	
	
	
	private static  Properties properties;
	static {
		properties = new Properties();
        try {
        	Class config_class = Class.forName(Constant.class.getName());
            InputStream is = config_class.getResourceAsStream("/init.properties");
            properties.load(is);

            GOODS_STATE.add(new OptionsInt(-1, "请选择"));
            GOODS_STATE.add(new OptionsInt(0, "预售中"));
            GOODS_STATE.add(new OptionsInt(1, "售票中"));
            
            GOODS_IS_SHOW.add(new OptionsInt(-1, "请选择"));
            GOODS_IS_SHOW.add(new OptionsInt(0, "隐藏"));
            GOODS_IS_SHOW.add(new OptionsInt(1, "激活"));
            
            GOODS_LIMIT_TIME.add(new OptionsInt(0, "不限时间"));
            GOODS_LIMIT_TIME.add(new OptionsInt(1, "指定时间"));
            
            //西安 北京 上海 广州 深圳 武汉 天津 杭州 重庆 成都 青岛 苏州 郑州 无锡 宁波 南京 大连 沈阳 合肥 温州 长沙 哈尔滨 南宁 济南 太原 长春 石家庄  锦州 
            GOODS_CITY.add(new OptionsInt(1, "西安"));
            GOODS_CITY.add(new OptionsInt(2, "北京"));
            GOODS_CITY.add(new OptionsInt(3, "上海"));
            GOODS_CITY.add(new OptionsInt(4, "广州"));
            GOODS_CITY.add(new OptionsInt(5, "深圳"));
            GOODS_CITY.add(new OptionsInt(6, "武汉"));
            GOODS_CITY.add(new OptionsInt(7, "天津"));
            GOODS_CITY.add(new OptionsInt(8, "杭州"));
            GOODS_CITY.add(new OptionsInt(9, "重庆"));
            GOODS_CITY.add(new OptionsInt(10, "成都"));
            GOODS_CITY.add(new OptionsInt(11, "青岛"));
            GOODS_CITY.add(new OptionsInt(12, "苏州"));
            GOODS_CITY.add(new OptionsInt(13, "郑州"));
            GOODS_CITY.add(new OptionsInt(14, "无锡"));
            GOODS_CITY.add(new OptionsInt(15, "宁波"));
            GOODS_CITY.add(new OptionsInt(16, "南京"));
            GOODS_CITY.add(new OptionsInt(17, "大连"));
            GOODS_CITY.add(new OptionsInt(18, "沈阳"));
            GOODS_CITY.add(new OptionsInt(19, "合肥"));
            GOODS_CITY.add(new OptionsInt(20, "温州"));
            GOODS_CITY.add(new OptionsInt(21, "长沙"));
            GOODS_CITY.add(new OptionsInt(22, "哈尔滨"));
            GOODS_CITY.add(new OptionsInt(23, "南宁"));
            GOODS_CITY.add(new OptionsInt(24, "济南"));
            GOODS_CITY.add(new OptionsInt(25, "太原"));
            GOODS_CITY.add(new OptionsInt(26, "长春"));
            GOODS_CITY.add(new OptionsInt(27, "石家庄"));
            GOODS_CITY.add(new OptionsInt(28, "锦州"));
        } catch (Exception e) {
            e.printStackTrace();
        }
	}

}
